import http from "@/api";
import { PORT1 } from "@/api/config/servicePort";

// 本月任务
export const getLast12MonthsProjectTasks = (params: any) => {
  return http.get(PORT1 + `/project/task/getLast12MonthsProjectTasks`, params, { noLoading: true });
};
// 本月问答
export const getLast12MonthsQuestions = (params: any) => {
  return http.get(PORT1 + `/question/getLast12MonthsQuestions`, params, { noLoading: true });
};
// 本月项目
export const last12Months = (params: any) => {
  return http.get(PORT1 + `/project/last12Months`, params, { noLoading: true });
};
// 本月日报
export const getLast12MonthsReports = (params: any) => {
  return http.get(PORT1 + `/report/getLast12MonthsReports`, params, { noLoading: true });
};

// 我的任务
export const myTaskApi = (params: any) => {
  return http.get(PORT1 + `/project/task/listAllSubtasksByUserId`, params, { noLoading: true });
};

// 我的项目
export const myProjectApi = (params: any) => {
  return http.get(PORT1 + `/project/list`, params, { noLoading: true });
};

// 我的日报
export const myReportApi = (params: any) => {
  return http.get(PORT1 + `/report/getPdmReportByUserId`, params, { noLoading: true });
};
// 添加日报
export const reportAddApi = (params: any) => {
  return http.post(PORT1 + `/report/add`, params);
};
